<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>HKXDR</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="Access-Control-Allow-Origin" content="*">
  <meta http-equiv="Cache-Control" content="max-age=7200" />
  <link rel="stylesheet" href="res/layui/css/layui.css">
  <link rel="stylesheet" href="res/css/default.css">
  <script src="res/js/qwebchannel.js"></script>
  <script src="res/js/session.js"></script>
  <script>
    // 创建计时器
    var timeRecord = 0
    window.mineTime = null
    // 数据接收函数
    var SignalJsResponse  = function (json) {
      if (!json) {
        return
      }
      let cmdType = JSON.parse(json).cmd || '' // 请求的内容
      sessionStorage.setItem(cmdType, json)
    }
    new QWebChannel(qt.webChannelTransport, function (channel) {
      var webobj = channel.objects.mainwt_object;
      window.mainwt = webobj;
      window.mainwt.SignalJsResponse.connect(SignalJsResponse );
      window.reqPageData = function (data) {
        let reqData = JSON.stringify(data)
        mainwt.SlotJsRequest(reqData)
      }
    });
  </script>
</head>

<body class="hkxdr-layout-default">
  <div class="layui-layout-body layui-layout-admin">
    <!-- 头部 -->
    <div class="layui-header"></div>
    <!-- 左侧菜单 -->
    <div class="layui-side">
      <div class="menu-list" id="menu-list"></div>
    </div>
    <!-- 主体内容 -->
    <div class="layui-body" id="LAY_app_body">
      <div class="main-content"></div>
    </div>
  </div>

  <script src="res/layui/layui.js"></script>
  <script src="res/js/laydate.js"></script>
  <script src="res/js/contextMenu.js"></script>
  <script>
    // 最小化刷新数据
    document.addEventListener('visibilitychange', function () {
      var isHidden = document.hidden;
      if (!isHidden) {
        sessionStorage.setItem('refresh', new Date())
      }
    })
    layui.config({
      base: 'res/js/', // 存放新模块的目录，不是 layui 的模块目录
      version: true
    }).extend({
      minMenu: 'minMenu', // 菜单
      minRoute: 'minRoute', // hash路由
    }).use(['minMenu', 'minRoute']);
  </script>

</body>

</html>